﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using shop.entity;
using shop.dao;
namespace shop.service
{
    public class RoleService
    {
        private RoleDao roleDao = new RoleDao();
        public Role getRole(int id){
            return roleDao.GetRole(id);
        }

        public List<Role> ListRole()
        {
            return roleDao.ListRole();
        }

        public int Add(Role role)
        {
            return roleDao.AddRole(role);
        }
       
        public bool DeleteRole(int id)
        {
            return roleDao.DeleteRole(id);
        }

        public bool UpdateRole(Role role)
        {
            return roleDao.UpdateRole(role);
        }
    }
}